package org.wdcode.web.memcache.client;

import org.wdcode.web.memcache.need.MemCacheNeed;

import com.danga.MemCached.MemCachedClient;
import com.danga.MemCached.SockIOPool;

/**
 * MemCached的客户端调用接口
 * @author WD
 * @since JDK6
 * @version 1.0 2010-08-29
 */
public interface MemCacheClient {
	/**
	 * 获得MemCachedClient
	 * @return MemCachedClient
	 */
	MemCachedClient getClient();

	/**
	 * 获得SockIO连接池
	 * @return SockIO连接池
	 */
	SockIOPool getSockIOPool();

	/**
	 * 获得MemCacheNeed
	 * @return MemCacheNeed
	 */
	MemCacheNeed getNeed();

	/**
	 * 设置键值
	 * @param key 键
	 * @param value 值
	 */
	boolean set(String key, Object value);

	/**
	 * 根据键获得值
	 * @param key 键
	 * @return 值
	 */
	Object get(String key);
}